<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ page import="com.gouwudai.gobbs.pojo.TbbsSysInfo,com.fredck.FCKeditor.*"%>
<%@ include file="../../common/common.jsp" %>	
<%@ include file="master_pass.jsp" %>
<% 	
masterLogin.hasPermission(1003);
//权限判断代码结束

boolean successFlag = false;
ISysInfoService service = (ISysInfoService)BeanManager.getBean("sysInfoService");
if(request.getMethod().equals("POST"))
{
	service.updateRegAgree(request.getParameter("regAgree"));
	successFlag = true;
}
TbbsSysInfo tbbsSysInfo = service.load();
%>
<html>
<head>
<title><%=SYSTITLE%> - 社区注册协议管理</title>
<%@ include file="../../common/meta.inc" %>
<link href="css.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="javascript" SRC="${pageContext.request.contextPath}/scripts/common-validator.js"></SCRIPT>
<script language="javascript">
	<%if(successFlag) {%>
		sl_alert("保存成功！");
	<%}%>
</script>
</head>
<body>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" bgcolor="#e6e6e6">
  <tr>
    <td align="center"><strong>配置社区基本信息</strong></td>
  </tr>
</table>
<form name="form1" method="post" action="">  
<table width="99%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#e6e6e6">
  <tr bgcolor="#f6f6f6">
    <td width="100" height="400" bgcolor="#f6f6f6"><strong>注册协议</strong><br>
      <br>
      支持html编辑</td>
    <td>
<%
FCKeditor oFCKeditor ;
oFCKeditor = new FCKeditor( request, "regAgree" ) ;
oFCKeditor.setBasePath( contextPath+"/fckeditor/" ) ;
oFCKeditor.setValue( tbbsSysInfo.getRegAgree() );
oFCKeditor.setHeight("400");
FCKeditorConfigurations fckConfig = oFCKeditor.getConfig();
fckConfig.put("LinkBrowser","true");//超链浏览
fckConfig.put("ImageBrowser","true");//图片浏览
fckConfig.put("FlashBrowser","true");//FLASH浏览
fckConfig.put("LinkUpload","true");//文件上传
fckConfig.put("ImageUpload","true");//图片上传
fckConfig.put("FlashUpload","true");//FLASH上传
oFCKeditor.setConfig(fckConfig);
out.println( oFCKeditor.create() ) ;
%>	
</td>
  </tr>
   <tr bgcolor="#f6f6f6">
    <td>&nbsp;</td>
    <td><button name="btnSave" id="btnSave" class="btn btnEx" type="submit">保存</button></td>
  </tr>
</table>
</form>
</body>
</html>
